<!--<!DOCTYPE html>注释之后可以进行style的使用-->
<!--<!DOCTYPE html>-->
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title>mousemove</title>
    <script src="https://cdn.bootcss.com/vue/2.6.10/vue.js"></script>
</head>
<body>
<div id="app">
    <!--
    指定鼠标在 p 内部移动的时候要执行的方法
    -->
    <p @mousemove="mm" style="height: 100%">
        x:{{x}}
        y:{{y}}
        <span @mousemove.stop>鼠标移动到此即停止</span>
    </p>
</div>
</body>
<script type="text/javascript">
    Vue.config.productionTip = false;
    new Vue({
        el: '#app',
        data: {
            x:0,
            y:0
        },
        methods:{
            mm:function (event) {
                this.x = event.clientX;
                this.y = event.clientY;
            }
        }
    });
</script>
</html>